package book;

public class BookList{
    private Book[] book;//书架
    private int number;//图书种类个数

    public BookList() {
        this.book = new Book[10];
        //new 一个 Book类存到 数组中
        this.book[0] = new Book("三国演义","罗贯中",33,"名著");
        this.book[1] = new Book("西游记","吴承恩",33,"名著");
        this.book[2] = new Book("红楼梦","曹雪芹",33,"名著");
        this.number = 3;
    }

    public Book getBook(int number) {
        return this.book[number];
    }

    public void setBook(Book book,int number) {
        this.book[number] = book;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
